package utils

import (
	"strings"
)

const (
	TENANT_SEP = "##"
)

func ExtractUser(name string) (string, string) {
	if strings.Contains(name, TENANT_SEP) {
		names := strings.Split(name, TENANT_SEP)
		return names[0], names[1]
	}
	return name, ""
}

func BuildMemberName(member, tenant string) string {
	return member + TENANT_SEP + tenant
}

func TenantSuffix(tenant string) string {
	return TENANT_SEP + tenant
}
